Implement the data structure with these operations, and specify and
verify that they behave in the way described above.